<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\LinkPager;
use yii\helpers\Url;
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="pay">
  <div class="payCont">
    <div class="content-wrap">
      <h1 class="tt0">支付订单</h1>
      <div class="payInfo1">
        <img src="http://static.tianpinwang.com.cn/v1/images/addCartSuccess.png" alt="" class="confirmSuc">
        <h1 class="tt1">订单提交成功！请您立即付款，我们将为您尽快送达 
          <span class="shouldPay right">应付金额：
            <em class="number">￥<?=Html::encode($model->pay_fee)?></em>
          </span>
        </h1>
        <p class="txt1"><!-- 请在<span class="deadTime">2小时0分</span>内完成支付, 超时后将取消订单 --><span class="right orderDetail">订单详情<i class="fa fa-angle-down"></i></span></p>
        <div class="orderInfo">
          <p class="itemInfo">
            <span class="Itt">订&nbsp;&nbsp;单&nbsp;&nbsp;号：</span>
            <span class="Itxt"><?=Html::encode($model->id)?></span>
          </p>
          <p class="itemInfo">
            <span class="Itt">收货信息：</span>
            <span class="Itxt"><?=Html::encode($address)?></span>
          </p>
          <p class="itemInfo">
            <span class="Itt">商品名称：</span>
            <span class="Itxt">

            <?php foreach ($prolist as $key => $value): ?>
                <?=Html::encode($value['name']." x ".$value['product_num'])?><br>
            <?php endforeach ?>

            </span>
          </p>
      <!--     <p class="itemInfo">
            <span class="Itt">配送时间：</span>
            <span class="Itxt">任意时间</span>
          </p> -->
          <!-- <p class="itemInfo">
            <span class="Itt">发票抬头：</span>
            <span>阿里私家有限公司</span>
          </p> -->
        </div>
      </div>

      <div class="paySelect">
        <ul class="wayLists">
          <!-- <li class="">
            <span class="check-box"></span>使用余额
            <span class="elem2">你的余额：￥<?=Html::encode($money)?></span>
            <span class="payNumber right">支付：<em class="number">￥<?=Html::encode($model->pay_fee)?></em></span>
          </li> -->
          <li class="waySelected">
            <span class="btn-radio selected"></span>支付宝支付
            <span class="elem2 toHide elem3 thirdPay" style="display:block">
              <span class="inlineBlock zhifubao currentWay">
              <img src="http://static.tianpinwang.com.cn/v1/images/zhifubao-icon.png" alt="" class="payIcon">支付宝支付 <i class="fa fa-check"></i>
              </span>
              <!-- <span class="inlineBlock weixin">
              <img src="http://static.tianpinwang.com.cn/v1/images/weixin-icon.png" alt="" class="payIcon">微信支付<i class="fa fa-check"></i></span> -->
            </span>
            <span class="payNumber right ">支付：
              <em class="number">￥<?=Html::encode($model->pay_fee)?></em>
            </span>
            <!-- <span class="elem2 txt1 inHide">支持支付宝，微信支付</span> -->
          </li>
          <!-- <li>
            <span class="btn-radio"></span>平台支付
            <span class="elem2 toHide elem3 thirdPay">
              <span class="inlineBlock zhifubao currentWay">
              <img src="http://static.tianpinwang.com.cn/v1/images/zhifubao-icon.png" alt="" class="payIcon">支付宝支付 <i class="fa fa-check"></i>
              </span>
              <span class="inlineBlock weixin">
              <img src="http://static.tianpinwang.com.cn/v1/images/weixin-icon.png" alt="" class="payIcon">微信支付<i class="fa fa-check"></i></span>
            </span>
            <span class="payNumber right toHide">支付：
              <em class="number">￥<?=Html::encode($model->pay_fee)?></em>
            </span>
            <span class="elem2 txt1 inHide">支持支付宝，微信支付</span>
          </li>
          <li>
            <span class="btn-radio"></span>网银支付<span class="elem2 txt1">需要开通网上银行</span>
            <span class="payNumber right toHide">支付：
              <em class="number">￥<?=Html::encode($model->pay_fee)?></em>
            </span>
            <span class="toHide">
              <ul class="bankLists">
                <li class="bankSelected"><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
                <li><i class="fa fa-check"></i></li>
              </ul>
            </span>

          </li>
          <li><span class="btn-radio"></span>柜台/ATM汇款
            <span class="elem2 txt2 toHide elem4">转账成功后，请电话告知我们客服，以便尽快到账，客服热线：<?= $this->params['w_config']['contact_tel'] ?></span>
              <span class="payNumber right toHide">支付：
                <em class="number">￥<?=Html::encode($model->pay_fee)?></em>
              </span>
              <div class="supportBank toHide">
                <dl>
                  <dt></dt>
                  <dd>开户名：<span class="ans">杭州袋狮信息技术有限公司</span></dd>
                  <dd>开户行：<span class="ans">建设银行杭州钱塘支行</span></dd>
                  <dd>帐户号：<span class="ans">1111111111111111111111111111111</span></dd>
                </dl>
                <dl>
                  <dt></dt>
                  <dd>开户名：<span class="ans">杭州袋狮信息技术有限公司</span></dd>
                  <dd>开户行：<span class="ans">建设银行杭州钱塘支行</span></dd>
                  <dd>帐户号：<span class="ans">1111111111111111111111111111111</span></dd>
                </dl>
                <dl>
                  <dt></dt>
                  <dd>开户名：<span class="ans">杭州袋狮信息技术有限公司</span></dd>
                  <dd>开户行：<span class="ans">建设银行杭州钱塘支行</span></dd>
                  <dd>帐户号：<span class="ans">1111111111111111111111111111111</span></dd>
                </dl>
              </div>

          </li> -->
        </ul>
        <p class="payBtn">
        <a href="javascript:void(0)" id="paynow" value="/order/alipay/<?=Html::encode($model->id)?>" class="btn btn-middle-default">立即支付</a>
        </p>
        <p class="payBtn" style="display:none">
          <span class="btn btn-middle-default disabled">请在柜台/ATM完成支付</span>
        </p>
      </div>
    </div>
  </div>


  <div class="mask" style="display: none;"></div>
  <div class="payPop" style="display:none;">
    <img src="http://static.tianpinwang.com.cn/v1/images/addCartFail.png" alt="" class="icon">
    <img src="http://static.tianpinwang.com.cn/v1/images/closeIcon1.png" alt="" class="close">
    <h1 class="tt0">请您在新开的页面进行支付</h1>
    <p class="txt0">完成前请不要关闭该窗口</p>
    <p>
      <a href="/mycount/center" class="btn-small-default">已完成支付</a>
      <a href="/" class="btn-small-empty">返回首页</a>
    </p>
    <p class="txt1">遇到任何问题请咨询：<?= $this->params['w_config']['contact_tel'] ?></p>
  </div>



  


<script>
  $(function(){

    $('#paynow').click(function(){      //--------------------------------------
      $('.mask').attr('style','display:block');
      $('.payPop').attr('style','display:block');
      window.open($(this).attr('value'));
    });



    if($('.messageInfo').text().length>1){
      $('.messageInfo').addClass('bigNumber');
    };
    $('.cartList').children('li').on('mouseenter',function(){
      $(this).find('.close').css('display','block');
    }).on('mouseleave',function(){
      $(this).find('.close').css('display','none');
    });
    $('.cartList').find('.close').on('click',function(e){
      e.preventDefault();
      $(this).parent().parent().remove();
    });
    $('.shopping').on('mouseover',function(){
      $('.popList').css('display','block');
    }).on('mouseout',function(){
      $('.popList').css('display','none');
    });
    $('.logged').on('mouseenter',function(){
      $('.popNav').css('display','block');
    }).on('mouseleave',function(){
      $('.popNav').css('display','none');
    });


    var $wayLists=$('.wayLists');
    var $radios=$wayLists.find('.btn-radio');
    var $checks=$wayLists.find('.check-box');
    $('.thirdPay').children('span').on('click',function(){
      if(!$(this).hasClass('currentWay')){
        $(this).addClass('currentWay').siblings().removeClass('currentWay');
      }
    });




    $radios.on('click',function(){
      if(!$(this).hasClass('selected')){
        $('.toHide').css('display','none');
        $('.inHide').css('display','block');
        $radios.removeClass('selected').parent().removeClass('waySelected');
        $(this).addClass('selected').parent().addClass('waySelected');
        $(this).siblings('.toHide').css('display','block').siblings('.inHide').css('display','none');

      }else {
        $(this).removeClass('selected').parent().removeClass('waySelected');
        $(this).siblings('.toHide').css('display','none').siblings('.inHide').css('display','block');
      }
    });

    $checks.on('click',function(){
      if(!$(this).hasClass('selected')){
        $(this).parent().addClass('waySelected');
      }else {
        $(this).parent().removeClass('waySelected');
      }
    });

    var $bankLis=$('.bankLists').children('li');
    $bankLis.on('click',function(){
      if(!$(this).hasClass('bankSelected')){
        $bankLis.removeClass('bankSelected');
        $(this).addClass('bankSelected');
      }else {
        $(this).removeClass('bankSelected');
      }
    });

    var $orderInf=$('.payInfo1').find('.orderInfo');
    $('.orderDetail').click(function(){
      if($orderInf.css('display')=='none'){
        $orderInf.css('display','block');
      }else {
        $orderInf.css('display','none');
      }
    });


    var $payPop=$('.payPop');
    var $closePop=$payPop.find('.close');
    $closePop.click(function(){
      $payPop.css('display','none');
      $('.mask').css('display','none');
    });



  })
</script>
</body>
</html>
